package gov.police.diary.service.impl;

import gov.police.diary.dao.DepartmentDao;
import gov.police.diary.model.PolDepartment;
import gov.police.diary.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author nmduc
 */
@Service("DepartmentService")
public class DepartmentServiceImpl implements DepartmentService {

    @Autowired
    private DepartmentDao departmentDao;

    public PolDepartment getDepartment(long id) {
        return this.departmentDao.getDepartment(id);
    }

    public void saveDepartment(PolDepartment department) {
        this.departmentDao.saveDepartment(department);
    }

    public void deleteDepartment(PolDepartment department) {
        this.departmentDao.deleteDepartment(department);
    }

    public void updateDepartment(PolDepartment department) {
        this.departmentDao.updateDepartment(department);
    }

    public DepartmentDao getDepartmentDao() {
        return departmentDao;
    }

    public void setDepartmentDao(DepartmentDao departmentDao) {
        this.departmentDao = departmentDao;
    }
}
